<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>CRM客户关系管理系统</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="/gaoa/Public/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="/gaoa/Public/css/global.css" media="all"/>
		<link rel="stylesheet" href="/gaoa/Public/plugins/font-awesome/css/font-awesome.min.css"/>
		<link rel="stylesheet" href="/gaoa/Public/css/amaran.min.css"/>
		<link rel="stylesheet" href="/gaoa/Public/css/index.css"/>
		<style>
			.ui-pnotify {
				background: #fff;
			}
			.amaran .icon {
				background: #fff!important;
			}
			.amaran .icon img{
				max-width: 100px;
				max-height: 100px;
				display: block;
				margin: 0 auto;
			}
			.layui-nav-tree .layui-nav-bar{
			  width: 5px;
        height: 0;
				background-color: #FF5722;
			}
	    .layui-nav-tree .layui-this>a, .layui-nav-tree .layui-this>a:hover{
		    background-color: #29a0e2;
        color: #fff;
	    }
	    .layui-nav-tree .layui-this>a{
	    	background-color: #2080b5;
      }
      .layui-nav-child{
    	  text-indent: 1em;
      }
			.layui-tree li a cite {
			    padding: 0 6px;
			    font-size: 16px;
			}
			.layui-tree li i {
			    padding-left: 6px;
			    color: rgba(255,255,255,.5);
			}
			.layui-side-scroll {
			    width: 220px;
			    height: auto;
			    overflow-x: hidden;
			}
			::-webkit-scrollbar {
			    width: 0;
			    height: 10px;
			}
			#allUser{
				 text-indent: 0;
			}
			#allUser{
				line-height: 40px;
			}
		  #allUser li a {
		    display: inline;
		    vertical-align: top;
		    height: 26px;
		    cursor: pointer;
		    padding: 5px;
		  }
		</style>
		<!--[if lte IE 9]> 
	    <script>
	        window.location.href="<?php echo U('login/notsupport');?>";
	    </script>
	    <![endif]-->
		<script>

			window.webRoot = '/gaoa/'; // /crm  
			window.indexUrl= '/gaoa/index.php/index';//IndexController
		</script>
	</head>
	<body>
		<div class="layui-layout layui-layout-admin" id="layui_layout">
			<div class="layui-header header header-demo" style="border-bottom: 2px solid #ea4b4b;">
				<div class="layui-main">
					<div class="admin-login-box">
						<a class="logo" style="left: 0;" href="#">
							<span style="font-size:22px;">财务办公管理系统</span>
						</a>
						<div class="admin-side-toggle">
							<i class="fa fa-bars" aria-hidden="true"></i>
						</div>
					</div>
					<ul class="layui-nav admin-header-item" lay-filter="user">
                        <li class="layui-nav-item" style="color:#d85126;">
							<p>北京时间 <span class="date"></span></p>
						</li>
						<li class="layui-nav-item" style="color:#d85126;">
							欢迎您！&nbsp;<!-- 本次登录地点为：<?php echo session('location.location');?> -->
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" id="lock" style="color:#d85126;"><i class="layui-icon">&#xf0098;</i>&nbsp;锁屏</a>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" id='refresh' style="color:#d85126;"><i class="layui-icon">&#xf0008;</i>&nbsp;刷新</a>
						</li>
					  	<?php $userInfo = session('account')['userInfo']; ?>
						<li class="layui-nav-item">
							<a href="javascript:;" class="admin-header-user" style="color:#d85126;">
								<img src="/gaoa<?php echo ($userInfo['head']); ?>" />
								<span><?php echo session('account')['account']?></span>
							</a>
							<dl class="layui-nav-child">
								<dd>
									<a data-tab="true" data-url="<?php echo U('UserDetail/index');?>"><i class="layui-icon">&#xe629;</i> <cite>个人信息</cite></a>
								</dd>
								<dd>
									<a data-tab="true" data-url="<?php echo U('UserDetail/changepwd');?>"><i class="layui-icon">&#xe620;</i> <cite>设置</cite></a>
								</dd>
								<dd>
									<a href="<?php echo U('Login/logOut');?>"><i class="layui-icon">&#xe659;</i> <cite>注销</cite></a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>

			<div class="layui-side layui-bg-black" id="admin-side">
				<div class="layui-side-scroll" id="admin-navbar-side" lay-filter="side"></div>
        <!--<?php echo ($navbar); ?>-->
				<!-- <ul  id="allUser"></ul> -->
			</div>

			<div class="layui-body" style="top: 57px;" id="admin-body">
				<div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab">
					<ul class="layui-tab-title">
						<li class="layui-this">
							<i class="layui-icon" aria-hidden="true">&#xe656;</i>
							<cite>我的工作台</cite>
						</li>
					</ul>
					<div class="layui-tab-content" style="min-height: 150px; padding:0;">
						<div class="layui-tab-item layui-show">
							<iframe src="<?php echo U('Index/main');?>"></iframe>
						</div>
					</div>
				</div>
			</div>
			<div class="site-tree-mobile layui-hide">
				<i class="layui-icon">&#xe602;</i>
			</div>
			<div class="site-mobile-shade"></div>			
		</div>
		<!-- 锁屏 -->
		<div class="lock-screen" style="display: none;">
			<div id="locker" class="lock-wrapper">
				<div id="time"></div>
				<div class="lock-box center">
					<img src="/gaoa/Public/images/a8.jpg" width="100%" height="100%" style="width:100px;height:100px;" alt="">
					<h1>admin</h1>
					<div class="form-group col-lg-12" style="font-size:18px;">
						<input type="password" id="lock_password" class="form-control lock-input" autofocus name="lockpwd" value="123456" placeholder='锁屏状态，请输入密码解锁' />
						<button id="unlock" class="layui-btn layui-btn-warm">解锁</button>
					</div>
				</div>
			</div>
		</div>
		<a href="" id="qqTrigger" style="display: none;"></a>
		<script type="text/javascript" src="/gaoa/Public/plugins/layui/layui.js"></script>
		<script type="text/javascript" src="<?php echo U('Nav/index');?>" ></script>
		<script src="/gaoa/Public/js/index.js"></script>
		<script src="/gaoa/Public/js/jquery.1.11.min.js"></script>
		<script src="/gaoa/Public/plugins/amaran/jquery.amaran.js"></script>
		<div style="display:none">
		  <script src="https://s13.cnzz.com/z_stat.php?id=1262057085&web_id=1262057085" language="JavaScript"></script>
	  </div>
		<script>
		// layui.use(['tree', 'layer','tab'], function(){
		//   var layer = layui.layer
		//   ,$ = layui.jquery; 
		//   tab = layui.tab();
		//   layui.tree({
		//     elem: '#allUser', //指定元素
		//     click:function(item){
		//         if(item.field === undefined){
		//        	  console.log(item);
		// 	        layer.msg('出现未知错误请联系技术团队', {
		// 	          time: 3000, //3s后自动关闭
		// 	          btn: ['马上去', '知道了', '哦']
		// 	        });
		//         }else{
           
		//        	  tab.tabAdd(item.field);
		//         }
		//     }, 
		//     nodes: <?php echo json_encode($tree);?>,
		//   });
		 
		//   //生成一个模拟树
		//   var createTree = function(node, start){
		//     node = node || function(){
		//       var arr = [];
		//       for(var i = 1; i < 10; i++){
		//         arr.push({
		//           name: i.toString().replace(/(\d)/, '$1$1$1$1$1$1$1$1$1')
		//         });
		//       }
		//       return arr;
		//     }();
		//     start = start || 1;  
		//     layui.each(node, function(index, item){  
		//       if(start < 10 && index < 9){
		//         var child = [
		//           {
		//             name: (1 + index + start).toString().replace(/(\d)/, '$1$1$1$1$1$1$1$1$1')
		//           }
		//         ];
		//         node[index].children = child;
		//         createTree(child, index + start + 1);
		//       }
		//     });
		//     return node;
		//   };

		// });
		</script>
		<script>
     //console.log(navigator.userAgent);

			//利用ajax将测试数据保存
			function Ajapost(){
				$.post("<?php echo U('test');?>");
			}
	    window.onbeforeunload = function(){
	    	$.post("<?php echo U('test');?>");
	      return Ajapost();
	    }

		</script>

	</body>

</html>